﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Management/ManagementMasterPage.master" AutoEventWireup="true" CodeBehind="RecommendProduct.aspx.cs" Inherits="WebApp.Management.Product.RecommendProduct" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphContent" runat="server">
	<asp:RadioButtonList ID="rblType" runat="server" AutoPostBack="True" OnSelectedIndexChanged="rblType_SelectedIndexChanged"
		RepeatDirection="Horizontal">
		<asp:ListItem Text="编辑之选" Value="Recommend" Selected="True" />
		<asp:ListItem Text="会员关注" Value="Focus" />
		<asp:ListItem Text="积分兑换" Value="Point" />
	</asp:RadioButtonList>
	<asp:ListView ID="lvProdust" runat="server" OnItemCommand="lvProdust_ItemCommand">
		<LayoutTemplate>
			<table cellpadding="2" border="1">
				<tr>
					<th></th>
					<th>Name</th>
					<th>Brand</th>
					<th>Series</th>
					<th>Category</th>
					<th>Comments</th>
					<th>Views</th>
					<th>Other</th>
				</tr>
				<tr id="itemPlaceholder" runat="server" />
			</table>
		</LayoutTemplate>
		<ItemTemplate>
			<tr>
				<td><asp:Image ID="Image1" ImageUrl='<%# Eval("Product.PictureUrl") %>' runat="server" Height="96" Width="96" /></td>
				<td><%# Eval("Product.Name") %></td>
				<td><%# Eval("Product.Brand.Name") %></td>
				<td><%# Eval("Product.ProductSeries.Name") %></td>
				<td><%# Eval("Product.ProductCategory.Name") %></td>
				<td><%# Eval("Product.Comments.Count") %></td>
				<td><%# Eval("Product.Views") %></td>
				<td>
					<a href='ProductEditor.aspx?PID=<%# Eval("Product.ProductId") %>'>Edit</a>
					<asp:LinkButton ID="btnDelete" runat="server" CommandName="OnDelete" CommandArgument='<%# Eval("RecommendProductId") %>'>取消</asp:LinkButton>
					<cc1:ConfirmButtonExtender ID="btnDelete_ConfirmButtonExtender" runat="server" ConfirmText="取消推荐该产品的？" Enabled="True" TargetControlID="btnDelete" />
				</td>
			</tr>
		</ItemTemplate>
	</asp:ListView>
</asp:Content>
